home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.awt;
-
- import java.util.Enumeration;
-
- class MatrixEnumeration implements Enumeration {
- // $FF: renamed from: m symantec.itools.awt.Matrix
- Matrix field_0;
- boolean started;
-
- MatrixEnumeration(Matrix var1) {
- this.field_0 = var1;
- }
-
- public boolean hasMoreElements() {
- return this.field_0.nextElt != null ? true : this.hasMoreRows();
- }
-
- public boolean hasMoreRows() {
- if (this.field_0.nextRow == null) {
- return false;
- } else {
- Matrix var1 = this.field_0.nextRow;
-
- while(var1.o == null && var1.nextElt == null) {
- if ((var1 = var1.nextRow) == null) {
- return false;
- }
- }
-
- return true;
- }
- }
-
- public Object nextElement() {
- if (!this.started) {
- this.started = true;
- if (this.field_0.o != null) {
- return this.field_0.o;
- }
- }
-
- if (this.field_0 == null) {
- return null;
- } else if (this.field_0.nextElt != null) {
- this.field_0 = this.field_0.nextElt;
- return this.field_0.o;
- } else {
- return (this.field_0 = this.findNextRow()) == null ? null : this.field_0.o;
- }
- }
-
- Matrix findNextRow() {
- this.started = true;
- Matrix var1 = this.field_0.nextRow;
- if (var1 == null) {
- return null;
- } else {
- while(var1.o == null && var1.nextElt == null) {
- if ((var1 = var1.nextRow) == null) {
- return null;
- }
- }
-
- var1 = var1.o != null ? var1 : var1.nextElt;
- return var1;
- }
- }
-
- public int currRow() {
- return this.field_0.row;
- }
-
- public int currCol() {
- return this.field_0.col;
- }
-
- public Object nextRow() {
- this.field_0 = this.findNextRow();
- return this.field_0.o;
- }
-
- public Object advanceTo(int var1) throws IllegalArgumentException {
- this.started = true;
- if (var1 >= this.field_0.row && var1 != this.field_0.row) {
- Matrix var2 = this.field_0;
-
- while(this.field_0.row < var1) {
- this.field_0 = this.findNextRow();
- if (this.field_0 == null) {
- this.field_0 = var2;
- throw new IllegalArgumentException("requested row too large: r=" + var1);
- }
- }
-
- return this.field_0.o;
- } else {
- throw new IllegalArgumentException("r must be greater than current row: r=" + var1 + "current row=" + this.field_0.row);
- }
- }
- }
-